#ifndef SPINBEHAVIOR_H
#define SPINBEHAVIOR_H

#include "Board.h"
#include "GameObject.h"
#include "Direction.h"
#include "GameBehavior.h"
#include "Turnable.h"
#include "TurnStep.h"
#include "Activatable.h"

class SpinBehavior: public GameBehavior
{
public:
	SpinBehavior();
	virtual ~SpinBehavior();

	void SetActivator(GameObject* spinner);
	void SetTurnDirection(const Direction& direction);

	virtual void GenerateSteps(Board& board);
	virtual void Execute();

protected:

private:
	void Clear();
	void AddStep(GameObject* object, Turnable* turnable, Board* board);

	GameObject* activatableObject;
	Activatable* activatableInterface;
	std::list<GameStep*> steps;
	Direction turnDirection;
};

#endif //SPINNERSTEPCALCULATOR_H
